﻿namespace RaGE
{
    class JDNPCGen
    {
        public int version;
        public int creature_sets_count;
        public int resource_sets_count;
        public int dynamics_count;
        public int triggers_count;

        public JDCreatureSets[] creature_sets;
        public JDResourceSets[] resource_sets;
        public JDDynamic[] dynamics;
        public JDTrigger[] triggers;
    }

    public class JDCreatureGroup
    {
        public int id;
        public int amount;
        public int respawn;
        public int unknown_2;
        public int unknown_3;
        public int unknown_4;
        public int unknown_5;
        public int unknown_6;
        public int unknown_7;
        public int unknown_8;
        public bool unknown_9;
        public bool unknown_10;
        public bool unknown_11;
        public bool unknown_12;
        public int unknown_13;
        public int unknown_14;
        public int unknown_15;
        public int unknown_16;
    }

    public class JDCreatureSets
    {
        public int spawn_mode;
        public int creature_groups_count;
        public float spawn_x;
        public float spawn_alt;
        public float spawn_z;
        public float rot_1;
        public float rot_2;
        public float rot_3;
        public float spread_x;
        public float spread_alt;
        public float spread_z;
        public int unknown_7;
        public int unknown_8;
        public bool unknown_9;
        public bool unknown_10;
        public bool unknown_11;
        public int unknown_12;
        public int trigger;
        public int unknown_14;
        public int unknown_15;
        public int unknown_16;
        public int unknown_17;
        public JDCreatureGroup[] creature_groups;
        public int[] mutualExclusionGroup;
    }

    public class JDResourceGroup
    {
        public int unknown_1;
        public int id;
        public int respawn;
        public int amount;
        public int unknown_2;
    }

    public class JDResourceSets
    {
        public float spawn_x;
        public float spawn_alt;
        public float spawn_z;
        public float spread_x;
        public float spread_z;
        public int resource_groups_count;
        public bool unknown_1;
        public bool unknown_2;
        public bool unknown_3;
        public int unknown_4;
        public byte unknown_5;
        public byte unknown_6;
        public byte unknown_7;
        public int unknown_trigger;
        public int unknown_8;
        public int unknown_index;
        public int unknown_mutual;
        public JDResourceGroup[] resource_groups;
        public int[] mutualExclusionGroup;
    }

    public class JDDynamic
    {
        public int id;
        public float spawn_x;
        public float spawn_alt;
        public float spawn_z;
        public byte unknown_5;
        public byte unknown_6;
        public byte unknown_7;
        public byte unknown_8;
        public int trigger;
    }

    public class JDTrigger
    {
        public int unknown_1;
        public int unknown_2;
        public byte[] name;
        public bool unknown_3;
        public int unknown_4;
        public int unknown_5;
        public bool unknown_6;
        public bool unknown_7;
        public int year_1;
        public int month_1;
        public int week_day_1;
        public int day_1;
        public int hour_1;
        public int minute_1;
        public int year_2;
        public int month_2;
        public int week_day_2;
        public int day_2;
        public int hour_2;
        public int minute_2;
        public int duration;
        public bool forced_stop;
        //public bool unknown_8;
    }

    public class JDOffset
    {
        public int[] BaseChain;
        public string Version;
        public int DirX;
        public int DirY;
        public int DirZ;
        public int PosX;
        public int PosY;
        public int PosZ;
    }
}
